%buttons {
  -webkit-appearance: none;
  display: inline-block;
  border: 2px solid $primary;
  border-radius: 0.3rem;
  background: $primary;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.5rem 0;
  vertical-align: middle;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

%buttons-hover {
  border: 2px solid darken($primary, 5%);
  background: darken($primary, 5%);
  text-decoration: none;
}

%buttons-focus {
  border: 2px solid darken($primary, 10%);
  background: darken($primary, 10%);
  text-decoration: none;
  outline: none;
}

#{$buttons} {
  @extend %buttons;

  &.secondary {
    background: darken($note-sidebar-color, 8%);
    border: 2px solid darken($note-sidebar-color, 8%);
    color: #666;

    &:hover {
      background: darken($note-sidebar-color, 12%);
      border: 2px solid darken($note-sidebar-color, 12%);
      color: #555;
    }
  }

  &.icon-button {
    display: flex;
    align-items: center;
    svg {
      margin-right: 0.75rem;
      stroke: rgba(255, 255, 255, 0.7);
    }
  }

  &.github-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #28a745;
    background-image: linear-gradient(-180deg, #34d058, #28a745 90%);
    border: 1px solid rgba(27, 31, 35, 0.2);
    border-radius: 0.3rem;
    font-size: 1.1rem;
    padding: 0.75rem 0.85rem;

    &:hover {
      background-image: linear-gradient(-180deg, #2fcb53, #269f42 90%);
    }

    img {
      margin-right: 0.5rem;
      height: 20px;
      width: 20px;
      max-width: 20px;
    }
  }

  &::-moz-focus-inner {
    border: 0;
    padding: 0;
  }

  &:hover,
  &:active {
    @extend %buttons-hover;
  }

  &:focus {
    @extend %buttons-focus;
  }
}
